package com.xls.boxlibrary.adapter;

import android.content.Context;
import android.view.ViewGroup;


import com.xls.boxlibrary.entity.TiXianJiLuEntity;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.rxjava3.annotations.NonNull;

public class TiXianJiLuAdapter extends MvpBaseRecyclerAdapter<TiXianJiLuViewHolder> {
    ArrayList<TiXianJiLuEntity> dataList;
    public TiXianJiLuAdapter(Context context,  ArrayList<TiXianJiLuEntity> dataList) {
        super(context);
        this.dataList=dataList;
    }

    @Override
    public void onBindView(@NonNull TiXianJiLuViewHolder holder, int position) {
        holder.setViewData(dataList.get(position));
        holder.initView();
    }

    @Override
    public void onBindView(TiXianJiLuViewHolder holder, int position, List<Object> payloads) {

    }

    @NonNull
    @Override
    public TiXianJiLuViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return new TiXianJiLuViewHolder(context,parent);
    }

    @Override
    public int getItemCount() {
        return dataList.size();
    }
}
